home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DJINC106.ARJ / MOUSE.H < prev    next >
C/C++ Source or Header  |  1992-03-09  |  1KB  |  56 lines

  1. /*
  2. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  3. **
  4. ** This file is distributed under the terms listed in the document
  5. ** "copying.dj", available from DJ Delorie at the address above.
  6. ** A copy of "copying.dj" should accompany this file; if not, a copy
  7. ** should be available from where this file was obtained.  This file
  8. ** may not be distributed without a verbatim copy of "copying.dj".
  9. **
  10. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  11. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. */
  13.  
  14. #ifndef _MOUSE_H_
  15. #define _MOUSE_H_
  16.  
  17. #define M_LEFT_DOWN     0x001
  18. #define M_LEFT_UP       0x002
  19. #define M_MIDDLE_DOWN   0x004
  20. #define M_MIDDLE_UP     0x008
  21. #define M_RIGHT_DOWN    0x010
  22. #define M_RIGHT_UP      0x020
  23. #define M_MOTION        0x040
  24. #define M_KEYPRESS      0x080
  25. #define M_POLL          0x100
  26. #define M_NOPAINT       0x200
  27.  
  28. #define M_BUTTON_DOWN   (M_LEFT_DOWN | M_MIDDLE_DOWN | M_RIGHT_DOWN)
  29. #define M_BUTTON_UP     (M_LEFT_UP | M_MIDDLE_UP | M_RIGHT_UP)
  30.  
  31. #define M_LEFT          1
  32. #define M_RIGHT         2
  33. #define M_MIDDLE        4
  34.  
  35. typedef struct {
  36.   int flags;
  37.   int x,y;
  38.   int buttons;
  39.   int key;
  40. } MouseEvent;
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46. void MouseGetEvent(int flags, MouseEvent *event);
  47. void MouseSetColors(int fg, int bg);
  48. void MouseSetSpeed(int speed);
  49. void MouseWarp(int x, int y);
  50.  
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54.  
  55. #endif
  56.